<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><title>TDSAudioOut - NewAC</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.4 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="TDSAudioOut"></a>TDSAudioOut</h1><div class=CBody><p>Performs audio playback using the DirectSound API.&nbsp; Descends from <a href="ACS_Classes-pas.html#TAuOutput" class=LClass id=link4 onMouseOver="ShowTip(event, 'tt3', 'link4')" onMouseOut="HideTip('tt3')">TAuOutput</a>.&nbsp; TDSAudioOut component buffers its output in order to make it more smooth.&nbsp; This buffering introduces some delay at the beginning of the audio playback with TDXAudioOut.&nbsp; See the <a href="#TDSAudioOut.Latency" class=LProperty id=link5 onMouseOver="ShowTip(event, 'tt2', 'link5')" onMouseOut="HideTip('tt2')">Latency</a> property for more detail.&nbsp; This component is more advanced than the TDxAudioOut and should replace the later.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#TDSAudioOut" >TDSAudioOut</a></td><td class=SDescription>Performs audio playback using the DirectSound API. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#TDSAudioOut.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#TDSAudioOut.Jump" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">Jump</a></td><td class=SDescription>This method, being a wrapper around &lt;Seek&gt;, simpifies navigation in the input stream. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#TDSAudioOut.Properties" >Properties</a></td><td class=SDescription></td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#TDSAudioOut.DeviceCount" >DeviceCount</a></td><td class=SDescription>This read only property returns the number of logical output DirectSound devices.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#TDSAudioOut.DeviceName" >DeviceName</a></td><td class=SDescription>This read only array property returns the name of the device specified by its number. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#TDSAudioOut.Underruns" >Underruns</a></td><td class=SDescription>This read only property returns the number of internal buffer underruns that have occurred during playback.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#TDSAudioOut.Volume" >Volume</a></td><td class=SDescription>Use this property to set or get the volume of the sound being played. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#TDSAudioOut.DeviceNumber" >DeviceNumber</a></td><td class=SDescription>Use this property to select the playback device by number. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#TDSAudioOut.Calibrate" >Calibrate</a></td><td class=SDescription>If this property is set to True the <a href="#TDSAudioOut.Latency" class=LProperty id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">Latency</a> value is increased until underruns are no more reported. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#TDSAudioOut.INIFile" >INIFile</a></td><td class=SDescription>Set this property to the ini file name where the <a href="#TDSAudioOut.Latency" class=LProperty id=link3 onMouseOver="ShowTip(event, 'tt2', 'link3')" onMouseOut="HideTip('tt2')">Latency</a> value should be stored. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#TDSAudioOut.Latency" >Latency</a></td><td class=SDescription>This property sets the average audio latency (the delay between the moment the audio data is passed to the component and the moment it is played. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#TDSAudioOut.OnUnderrun" >OnUnderrun</a></td><td class=SDescription>OnUnderrun event is raised when the component has run out of data. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.Jump"></a>Jump</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>procedure Jump(</td><td class=PParameter nowrap>Offs :</td><td class=PType nowrap>&nbsp;Integer</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>This method, being a wrapper around &lt;Seek&gt;, simpifies navigation in the input stream.&nbsp; Calling Jump moves you backward or forward relative to the current position.&nbsp; Jump may be called either before starting playback (in this case the playback will be started from the position specified) or during the playback.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Offs</td><td class=CDLDescription>the amount of file contents, in in units of 1/1000 of the content length, that will be skipped.&nbsp; Positive value skips forward, negative value skips backward.&nbsp; For example calling Jump(-1000) always sets the playing position at the beginning of the file and Jump(100) will skip forward to 1/10 of the file.&nbsp; Note: Use &lt;Seek&gt; for more exact positioning.</td></tr></table></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.Properties"></a>Properties</h3></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.DeviceCount"></a>DeviceCount</h3><div class=CBody><p>This read only property returns the number of logical output DirectSound devices.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.DeviceName"></a>DeviceName</h3><div class=CBody><p>This read only array property returns the name of the device specified by its number.&nbsp; Valid numbers range from 0 to <a href="#TDSAudioOut.DeviceCount" class=LProperty id=link6 onMouseOver="ShowTip(event, 'tt4', 'link6')" onMouseOut="HideTip('tt4')">DeviceCount</a> - 1.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.Underruns"></a>Underruns</h3><div class=CBody><p>This read only property returns the number of internal buffer underruns that have occurred during playback.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.Volume"></a>Volume</h3><div class=CBody><p>Use this property to set or get the volume of the sound being played.&nbsp; The default value is 0 which corresponds to the original volume of the sound.&nbsp; Valid values range from -10000 (silence) to 0.&nbsp; The Volume property allows you to make the played sound softer than the original one, but not louder.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.DeviceNumber"></a>DeviceNumber</h3><div class=CBody><p>Use this property to select the playback device by number.&nbsp; The default value is 0 which corresponds to the default audio output device in your system.&nbsp; Valid numbers range from 0 to <a href="#TDSAudioOut.DeviceCount" class=LProperty id=link7 onMouseOver="ShowTip(event, 'tt4', 'link7')" onMouseOut="HideTip('tt4')">DeviceCount</a> - 1.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.Calibrate"></a>Calibrate</h3><div class=CBody><p>If this property is set to True the <a href="#TDSAudioOut.Latency" class=LProperty id=link8 onMouseOver="ShowTip(event, 'tt2', 'link8')" onMouseOut="HideTip('tt2')">Latency</a> value is increased until underruns are no more reported.&nbsp; This way the Latency may be ajusted automatically.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.INIFile"></a>INIFile</h3><div class=CBody><p>Set this property to the ini file name where the <a href="#TDSAudioOut.Latency" class=LProperty id=link9 onMouseOver="ShowTip(event, 'tt2', 'link9')" onMouseOut="HideTip('tt2')">Latency</a> value should be stored.&nbsp; If <a href="#TDSAudioOut.Calibrate" class=LProperty id=link10 onMouseOver="ShowTip(event, 'tt5', 'link10')" onMouseOut="HideTip('tt5')">Calibrate</a> is set to True the calibrated Latency value is written to the file.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.Latency"></a>Latency</h3><div class=CBody><p>This property sets the average audio latency (the delay between the moment the audio data is passed to the component and the moment it is played.&nbsp; The latency is set in milliseconds.&nbsp; Lower latencies tend to produce more underruns.&nbsp; The reasonable values for this property lie in the range between 30 and 200 milliseconds.&nbsp; When passing audio through RDP or terminal services latency should be set to about 1000 milliseconds.&nbsp; If this property&rsquo;s value is changed during the playback, the internal buffer will be dynamically reset to the new value.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="TDSAudioOut.OnUnderrun"></a>OnUnderrun</h3><div class=CBody><p>OnUnderrun event is raised when the component has run out of data.&nbsp; This can happen if the component receives data at slow rate from a slow CD-ROM unit or a network link.&nbsp; You may also get OnUnderrun event when unpausing paused playback (this is a normal situation).&nbsp; Usually TDXAudioOut successfully recovers from underruns by itself, but this causes pauses in playback so if you start to receive OnUnderrun events, you may try to increase the speed rate of data passing to the component, if you can.&nbsp; Yo can check the <a href="#TDSAudioOut.Underruns" class=LProperty id=link11 onMouseOver="ShowTip(event, 'tt6', 'link11')" onMouseOut="HideTip('tt6')">Underruns</a> property for the total number of underruns.</p></div></div></div>

</div><!--Content-->


<div id=Footer>Content &copy; 2008-2010 Andrei Borovsky. Design &copy; 2008 Wayne Thursby. <b><u><a href="http://symmetrica.net/newac">Go to the project's main page</a></u></b>&nbsp; &middot;&nbsp; <a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MTitle>NewAC<div class=MSubTitle>v2.6.1</div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Documentation</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../doc/txt/introduction-txt.html">Quick Introduction to NewAC</a></div></div><div class=MEntry><div class=MFile><a href="../doc/txt/about_documentation-txt.html">About the Documentation</a></div></div><div class=MEntry><div class=MFile><a href="../doc/txt/cwguide-txt.html">Component Writer&rsquo;s Guide</a></div></div><div class=MEntry><div class=MFile><a href="../doc/txt/license-txt.html">License</a></div></div><div class=MEntry><div class=MFile><a href="../doc/txt/tips_and_tricks-txt.html">Tips &amp; Tricks</a></div></div><div class=MEntry><div class=MFile><a href="../doc/txt/newac-txt.html">About New Audio Components</a></div></div><div class=MEntry><div class=MFile><a href="../doc/txt/features-txt.html">NewAC Main Features List</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Main Units</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="ACS_AudioMix-pas.html">ACS_AudioMix</a></div></div><div class=MEntry><div class=MFile><a href="ACS_CDROM-pas.html">ACS_CDROM</a></div></div><div class=MEntry><div class=MFile><a href="ACS_Classes-pas.html">ACS_Classes</a></div></div><div class=MEntry><div class=MFile><a href="ACS_Converters-pas.html">ACS_Converters</a></div></div><div class=MEntry><div class=MFile><a href="ACS_DXAudio-pas.html">ACS_DXAudio</a></div></div><div class=MEntry><div class=MFile><a href="ACS_FLAC-pas.html">ACS_FLAC</a></div></div><div class=MEntry><div class=MFile><a href="ACS_Filters-pas.html">ACS_Filters</a></div></div><div class=MEntry><div class=MFile><a href="ACS_LAME-pas.html">ACS_LAME</a></div></div><div class=MEntry><div class=MFile><a href="ACS_MAC-pas.html">ACS_MAC</a></div></div><div class=MEntry><div class=MFile><a href="ACS_Misc-pas.html">ACS_Misc</a></div></div><div class=MEntry><div class=MFile><a href="ACS_MPC-pas.html">ACS_MPC</a></div></div><div class=MEntry><div class=MFile><a href="ACS_OptimFROG-pas.html">ACS_OptimFROG</a></div></div><div class=MEntry><div class=MFile><a href="ACS_smpeg-pas.html">ACS_SMPEG</a></div></div><div class=MEntry><div class=MFile><a href="ACS_Streams-pas.html">ACS_Streams</a></div></div><div class=MEntry><div class=MFile><a href="ACS_TTA-pas.html">ACS_TTA</a></div></div><div class=MEntry><div class=MFile><a href="ACS_Tags-pas.html">ACS_Tags</a></div></div><div class=MEntry><div class=MFile><a href="ACS_Vorbis-pas.html">ACS_Vorbis</a></div></div><div class=MEntry><div class=MFile><a href="ACS_WavPack-pas.html">ACS_WavPack</a></div></div><div class=MEntry><div class=MFile><a href="ACS_Wave-pas.html">ACS_Wave</a></div></div><div class=MEntry><div class=MFile><a href="ACS_WinMedia-pas.html">ACS_WinMedia</a></div></div><div class=MEntry><div class=MFile><a href="ACS_AAC-pas.html">ACS_AAC</a></div></div><div class=MEntry><div class=MFile><a href="AudioDMO-pas.html">AudioDMO</a></div></div><div class=MEntry><div class=MFile><a href="AudioPass-pas.html">AudioPass</a></div></div><div class=MEntry><div class=MFile><a href="AuSampleRate-pas.html">AuSampleRate</a></div></div><div class=MEntry><div class=MFile><a href="AuASIO-pas.html">AuASIO</a></div></div><div class=MEntry><div class=MFile><a href="AuSynch-pas.html">AuSynch</a></div></div><div class=MEntry><div class=MFile><a href="NewACDTS-pas.html">NewACDTS</a></div></div><div class=MEntry><div class=MFile><a href="NewAC_AVI-pas.html">NewAC_AVI</a></div></div><div class=MEntry><div class=MFile><a href="NewAC_DSP-pas.html">NewAC_DSP</a></div></div><div class=MEntry><div class=MFile><a href="NewACAC3-pas.html">NewACAC3</a></div></div><div class=MEntry><div class=MFile><a href="NewACIndicators-pas.html">NewACIndicators</a></div></div><div class=MEntry><div class=MFile id=MSelected>NewACDSAudio</div></div><div class=MEntry><div class=MFile><a href="ACS_AAC-pas.html">ACS_AAC</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Utility Units</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="ACS_Misc-pas.html">ACS_Misc</a></div></div><div class=MEntry><div class=MFile><a href="ACS_Procs-pas.html">ACS_Procs</a></div></div><div class=MEntry><div class=MFile><a href="acs_reg-pas.html">ACS_Reg</a></div></div><div class=MEntry><div class=MFile><a href="ACS_Types-pas.html">ACS_Types</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Tutorials</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="../demos/Tutorial/AudioProcessor/Main-pas.html">Audio Processor</a></div></div><div class=MEntry><div class=MFile><a href="../demos/Tutorial/ComponentsDemo/ComponentsDemo-pas.html">Components Demo</a></div></div><div class=MEntry><div class=MFile><a href="../demos/Recorders-rippers/Rip'n'listen/Main-pas.html">Rip&rsquo;n&rsquo;Listen Demo</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../dunit/dunit/Test_ACS_MAC-pas.html">ACS_MAC TestCases</a></div></div><div class=MEntry><div class=MFile><a href="../dunit/dunit/Test_ACS_WavPack-pas.html">ACS_WavPack TestCases</a></div></div><div class=MEntry><div class=MFile><a href="../dunit/dunit/Test_ACS_FLAC-pas.html">TestFLACEncode</a></div></div><div class=MEntry><div class=MFile><a href="../dunit/dunit/uLog-pas.html">uLog.pas</a></div></div><div class=MEntry><div class=MFile><a href="../dunit/dunit/uTestBase-pas.html">uTestBase</a></div></div><div class=MEntry><div class=MFile><a href="../dunit/dunit/uUtility-pas.html">uUtility</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Index</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Constants.html">Constants</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Properties.html">Properties</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Types.html">Types</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Variables.html">Variables</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Files.html">Files</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Constants">Constants</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Properties">Properties</option><option value="Types">Types</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([2], 6);// --></script></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>procedure Jump(</td><td class=PParameter nowrap>Offs :</td><td class=PType nowrap>&nbsp;Integer</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>This method, being a wrapper around Seek, simpifies navigation in the input stream. </div></div><div class=CToolTip id="tt2"><div class=CProperty>This property sets the average audio latency (the delay between the moment the audio data is passed to the component and the moment it is played. </div></div><div class=CToolTip id="tt3"><div class=CClass>The ancestor class for all output components.</div></div><div class=CToolTip id="tt4"><div class=CProperty>This read only property returns the number of logical output DirectSound devices.</div></div><div class=CToolTip id="tt5"><div class=CProperty>If this property is set to True the Latency value is increased until underruns are no more reported. </div></div><div class=CToolTip id="tt6"><div class=CProperty>This read only property returns the number of internal buffer underruns that have occurred during playback.</div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>